3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to create and manipulate scale transforms. A scale transform scales an object along the x , y , and z axes by specified values. You are responsible for ensuring that an object is at the correct location and in the proper orientation for the scaling to have the desired effect.
A scale factor can be negative. You should, however, exercise caution when using negative scale factors. In addition, when two or three of the scale factors are 0, nothing is drawn.
You can use the Q3ScaleTransform_New function to create a new scale transform.
TQ3TransformObject Q3ScaleTransform_New (
const TQ3Vector3D *scale);
The Q3ScaleTransform_New function returns, as its function result, a reference to a new transform object of type kQ3TransformTypeScale using the data passed in the scale parameter. The scale transform scales an object by the values in scale->x , scale->y , and scale->z , respectively. The data you pass in the scale parameter is copied into internal QuickDraw 3D data structures. If QuickDraw 3D cannot allocate memory for those structures, Q3ScaleTransform_New returns the value NULL .
You can use the Q3ScaleTransform_Submit function to submit a scale transform without creating an object or allocating memory.
TQ3Status Q3ScaleTransform_Submit (
TQ3Vector3D *scale,
TQ3ViewObject view);
You can use the Q3ScaleTransform_Get function to query the private data stored in a scale transform.
TQ3Status Q3ScaleTransform_Get (
TQ3TransformObject transform,
TQ3Vector3D *scale);
You can use the Q3ScaleTransform_Set function to set new private data for a scale transform.
TQ3Status Q3ScaleTransform_Set (
TQ3TransformObject transform,
const TQ3Vector3D *scale);
Previous | QD3D Book | Overview | Chapter Contents | Next |